//
//  HMTransitioningAnimator.m
//  HMBest
//
//  Created by itcast on 17/4/23.
//  Copyright © 2017年 itcast. All rights reserved.
//

#import "HMTransitioningAnimator.h"

@implementation HMTransitioningAnimator

#pragma mark - UIViewControllerTransitioningDelegate -
// 提供实现具体出现转场实现类的实例
- (nullable id <UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source {
    self.isPresented = YES;
    return self;
}

// 提供一个实现具体消失转场实现类的实例
- (nullable id <UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {
    self.isPresented = NO;
    return self;
}

#pragma mark - UIViewControllerAnimatedTransitioning -
// 具体的转场所需要的时间
- (NSTimeInterval)transitionDuration:(nullable id <UIViewControllerContextTransitioning>)transitionContext {
    return 1.0;
}

// 提供具体转场动画
- (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionContext {
    
}
@end
